package git.soulbgm.common.enums;

/**
 * 动态表名
 *
 * @author SoulBGM
 * @date 2022/05/06 23:02
 */
public enum DynamicTableName {
    /**
     * 实例
     */
    INSTANCE;

    /**
     * 表名
     */
    private final ThreadLocal<String> tableName = new ThreadLocal<>();

    public String getTableName() {
        return tableName.get();
    }

    public void setTableName(String tableName) {
        this.tableName.set(tableName);
    }

    public void remove() {
        tableName.remove();
    }

}
